package com.huqu.entities;

import java.io.Serializable;
import java.sql.Timestamp;
import java.sql.Types;

import com.huqu.basedao.QbMapping;
import com.huqu.utils.ApplicationHelper;

public class N400 implements Serializable{

	private static final long serialVersionUID = -7390351674436341905L;
	
	@QbMapping(name = "idvideo", typeMapping = Types.INTEGER)
	private int idvideo;
	private String md5video;
	
	@QbMapping(name = "tenvideo", typeMapping = Types.CHAR)
	private String tenvideo;
	
	@QbMapping(name = "link", typeMapping = Types.CHAR)
	private String link;
	
	@QbMapping(name = "hinhanh", typeMapping = Types.CHAR)
	private String hinhanh;
	
	@QbMapping(name = "nguoitao", typeMapping = Types.INTEGER)
	private int nguoitao;
	
	@QbMapping(name = "tgtao", typeMapping = Types.TIMESTAMP )
	private Timestamp tgtao;
	
	@QbMapping(name = "daxoa", typeMapping = Types.INTEGER)
	private int daxoa;
	
	@QbMapping(name = "kiemduyet", typeMapping = Types.INTEGER)
	private int kiemduyet;

	@QbMapping(name = "luotxem", typeMapping = Types.INTEGER)
	private int luotxem;

//==============================================================================================================
//==============================================================================================================
//==============================================================================================================
	public int getIdvideo() {
		return idvideo;
	}

	public void setIdvideo(int idvideo) {
		this.idvideo = idvideo;
	}

	public String getMd5video() {
		if(idvideo!=0){
			md5video=ApplicationHelper.convertToMD5(String.valueOf(idvideo));
		}
		return md5video;
	}

	public void setMd5video(String md5video) {
		this.md5video = md5video;
	}

	public String getTenvideo() {
		return tenvideo;
	}

	public void setTenvideo(String tenvideo) {
		this.tenvideo = tenvideo;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public String getHinhanh() {
		if(hinhanh==null){
			hinhanh="/images/upload/no-image.jpg";
		}else{
			hinhanh="/images/upload/video/"+hinhanh;
		}
		return hinhanh;
	}

	public void setHinhanh(String hinhanh) {
		this.hinhanh = hinhanh;
	}

	public int getNguoitao() {
		return nguoitao;
	}

	public void setNguoitao(int nguoitao) {
		this.nguoitao = nguoitao;
	}

	public Timestamp getTgtao() {
		return tgtao;
	}

	public void setTgtao(Timestamp tgtao) {
		this.tgtao = tgtao;
	}

	public int getDaxoa() {
		return daxoa;
	}

	public void setDaxoa(int daxoa) {
		this.daxoa = daxoa;
	}

	public int getKiemduyet() {
		return kiemduyet;
	}

	public void setKiemduyet(int kiemduyet) {
		this.kiemduyet = kiemduyet;
	}

	public int getLuotxem() {
		return luotxem;
	}

	public void setLuotxem(int luotxem) {
		this.luotxem = luotxem;
	}
	
	
	

}
